<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD><TITLE>Tk_ImageChanged manual page - Tk Library Procedures</TITLE>
<link rel="stylesheet" href="../docs.css" type="text/css" media="all">
</HEAD>
<BODY><H2><a href="../contents.htm">Tcl8.6.11/Tk8.6.11 Documentation</a> <small>&gt;</small> <a href="contents.htm">Tk C API</a> <small>&gt;</small> ImgChanged</H2>
<H3><A HREF="../UserCmd/contents.htm">Tcl/Tk Applications</A> | <A HREF="../TclCmd/contents.htm">Tcl Commands</A> | <A HREF="../TkCmd/contents.htm">Tk Commands</A> | <A HREF="../ItclCmd/contents.htm">[incr Tcl] Package Commands</A> | <A HREF="../SqliteCmd/contents.htm">SQLite3 Package Commands</A> | <A HREF="../TdbcCmd/contents.htm">TDBC Package Commands</A> | <A HREF="../TdbcmysqlCmd/contents.htm">tdbc::mysql Package Commands</A> | <A HREF="../TdbcodbcCmd/contents.htm">tdbc::odbc Package Commands</A> | <A HREF="../TdbcpostgresCmd/contents.htm">tdbc::postgres Package Commands</A> | <A HREF="../TdbcsqliteCmd/contents.htm">tdbc::sqlite3 Package Commands</A> | <A HREF="../ThreadCmd/contents.htm">Thread Package Commands</A> | <A HREF="../TclLib/contents.htm">Tcl C API</A> | <A HREF="../TkLib/contents.htm">Tk C API</A> | <A HREF="../ItclLib/contents.htm">[incr Tcl] Package C API</A> | <A HREF="../TdbcLib/contents.htm">TDBC Package C API</A></H3>
<H3><A NAME="M2">NAME</A></H3>
Tk_ImageChanged &mdash; notify widgets that image needs to be redrawn
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>#include &lt;tk.h&gt;</B><BR>
<B>Tk_ImageChanged</B>(<I>model, x, y, width, height, imageWidth, imageHeight</I>)<BR>
<H3><A NAME="M4">ARGUMENTS</A></H3>
<DL class="arguments">
<DT><A HREF="../TkLib/GetImage.htm">Tk_ImageMaster</A> <B>model</B> (in)<DD>
Token for image, which was passed to image's <I>createProc</I> when
the image was created.
<P><DT>int <B>x</B> (in)<DD>
X-coordinate of upper-left corner of region that needs redisplay (measured
from upper-left corner of image).
<P><DT>int <B>y</B> (in)<DD>
Y-coordinate of upper-left corner of region that needs redisplay (measured
from upper-left corner of image).
<P><DT>int <B>width</B> (in)<DD>
Width of region that needs to be redrawn, in pixels.
<P><DT>int <B>height</B> (in)<DD>
Height of region that needs to be redrawn, in pixels.
<P><DT>int <B>imageWidth</B> (in)<DD>
Current width of image, in pixels.
<P><DT>int <B>imageHeight</B> (in)<DD>
Current height of image, in pixels.
<P></DL>
<H3><A NAME="M5">DESCRIPTION</A></H3>
An image manager calls <B>Tk_ImageChanged</B> for an image
whenever anything happens that requires the image to be redrawn.
As a result of calling <B>Tk_ImageChanged</B>, any widgets using
the image are notified so that they can redisplay themselves
appropriately.
The <I>model</I> argument identifies the image, and
<I>x</I>, <I>y</I>, <I>width</I>, and <I>height</I>
specify a rectangular region within the image that needs to
be redrawn.
<I>imageWidth</I> and <I>imageHeight</I> specify the image's (new) size.
<P>
<I><A HREF="../TkLib/GetImage.htm">Tk_ImageModel</A></I> is synonym for <I><A HREF="../TkLib/GetImage.htm">Tk_ImageMaster</A></I>
<P>
An image manager should call <B>Tk_ImageChanged</B> during
its <I>createProc</I> to specify the image's initial size and to
force redisplay if there are existing instances for the image.
If any of the pixel values in the image should change later on,
<B>Tk_ImageChanged</B> should be called again with <I>x</I>, <I>y</I>,
<I>width</I>, and <I>height</I> values that cover all the pixels
that changed.
If the size of the image should change, then <B>Tk_ImageChanged</B>
must be called to indicate the new size, even if no pixels
need to be redisplayed.
<H3><A NAME="M6">SEE ALSO</A></H3>
<B><A HREF="../TkLib/CrtImgType.htm">Tk_CreateImageType</A></B>
<H3><A NAME="M7">KEYWORDS</A></H3>
<A href="../Keywords/I.htm#images">images</A>, <A href="../Keywords/R.htm#redisplay">redisplay</A>, <A href="../Keywords/I.htm#image size changes">image size changes</A>
<div class="copy">Copyright &copy; 1994 The Regents of the University of California.
<BR>Copyright &copy; 1994-1996 Sun Microsystems, Inc.
</div>
</BODY></HTML>
